<%--
  Created by IntelliJ IDEA.
  User: 陶昱全
  Date: 2021/11/18
  Time: 14:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <title>作业管理系统</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>

    <link rel="stylesheet" type="text/css" href="../static/css/teacherSystem.css"/>

</head>
<body>
<div class="container-fluid">
    <div class="container con1">
        <div class="row rown">
            <div class="col-md-10">
                <div class="col-md-12">
                    <img src="../static/img/16353973302582117.png" class="img-rounded" />
                    <h1>
                        <span>作业管理系统</span>
                    </h1>
                </div>
            </div>
            <div class="col-md-2">
                <div class="col-md-12">
                    <a  class="btn woff" href="${pageContext.request.contextPath}/hms/teaLogout">注销</a>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="container">
    <div class="row">
        <div class="col-md-2">
                <div class="col-md-12">
                    <ul class="list-unstyled submenu">
                        <li>
                            <strong><a href="#a1">我的班级</a></strong>
                        </li>
                        <li>
                            <strong><a href="#a2">我的作业</a></strong>
                        </li>
                    </ul>
                </div>
        </div>
        <div class="col-md-10">
            <div class="row">
                <div class="col-md-12" id="a1">
                    <blockquote>
                        <p>
                            我的班级
                        </p>
                    </blockquote>
                    <div class="btn-group">
                        <button class="btn" type="button" ><em class="icon-align-left"><a href="${pageContext.request.contextPath}/hms/toStuAddClazz">加入班级</a></em></button>
                    </div>
                    <table class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>
                                班级名
                            </th>
                            <th>
                                教师
                            </th>
                            <th>
                                详情
                            </th>
                            <th>
                                操作
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="clazz" items="${requestScope.get('clazz')}">
                            <tr class="info">
                                <td>${clazz.cname}</td>
                                <td>${clazz.name}</td>
                                <td>${clazz.particulars}</td>
                                <td>
                                    <a id="modal-${clazz.id}" href="#modal-container-${clazz.id}" role="button" class="btn" data-toggle="modal">退出班级</a>
                                </td>
                            </tr>
                            <div id="modal-container-${clazz.id}" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                            <h3 id="myModalLabel" style="color: brown">
                                                警告！
                                            </h3>
                                        </div>
                                        <div class="modal-body">
                                            <p>
                                                确定要退出这个班级吗？？？
                                            </p>
                                        </div>
                                        <div class="modal-footer">
                                            <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
                                            <button class="btn btn-primary"><a style="color: azure;" href="${pageContext.request.contextPath}/hms/outClazz/${clazz.id}">确定</a></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12" id="a2">
                    <blockquote>
                        <p>
                            我的作业
                        </p>
                    </blockquote>

                    <table class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>
                                班级
                            </th>
                            <th>
                                作业标题
                            </th>
                            <th>
                                分数
                            </th>
                            <th>
                                操作
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="work" items="${requestScope.get('work')}">
                            <tr class="warning">
                                <td>${work.cname}</td>
                                <td>${work.title}</td>
                                <td>${work.score}</td>
                                <td>
                                    <a href="${pageContext.request.contextPath}/hms/toStuUpdateWork/${work.id}" role="button" class="btn" data-toggle="modal">详情</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <blockquote>
                <p>
                    作业管理系统制作小组：
                </p> <small>成员：<cite>陶昱全、王浩然、陈亮、马煜博、赵阳阳</cite></small>
            </blockquote>
        </div>
    </div>
</div>
</body>
</html>

